package DAO;

import Entities.OrderServiceListEntity;
import Entities.UserEntity;
import org.springframework.orm.hibernate5.support.HibernateDaoSupport;

import java.util.List;

public class OrderManageDao extends HibernateDaoSupport {
    public boolean addOrderManage(OrderServiceListEntity serviceListEntity){
        getHibernateTemplate().save(serviceListEntity);
        return true;
    }

    public List<OrderServiceListEntity> queryManageList(String user_name){
        List<OrderServiceListEntity> serviceListEntityList = (List<OrderServiceListEntity>)
                this.getHibernateTemplate().find("from OrderServiceListEntity u where u.userName=?",user_name);
        return serviceListEntityList;
    }
}
